<?php

namespace app\index\controller;
use \think\Request;
use app\common\controller\Frontend;

class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
        $cid = Request::instance()->get('cid');
        $infomodel = new \app\admin\model\Information;
        $this->view->assign("infolist", $infomodel->getInfoList($cid));
        $this->view->assign("infolist2", $infomodel->getInfoList(2));
        $this->view->assign("infolist3", $infomodel->getInfoList(3));
        return $this->view->fetch();
    }
    public function infodetail()
    {
        $id = Request::instance()->get('id');
        $infomodel = new \app\admin\model\Information;
        $this->view->assign("info", $infomodel->getInfo($id));
        
        return $this->view->fetch();
    }

}
